package cn.tradewin.pmp.components.scope;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;

public class WbsLayout {
	
	 @Inject
	 private ComponentResources resources;
	 
	 @Inject
	 Messages message;
	 
	 @Property
	 private String pageName;
	 
	
	public String getClassForPageName() {
        return resources.getPageName().equalsIgnoreCase(pageName)
                ? "active"
                : null;
    }
	
	public String[] getPageNames() {
        return new String[]{"scope/wbs/create", "scope/wbs/delete", "scope/wbs/import","scope/wbs/list", "scope/wbs/update"};
    }
	
	public String getPageLabel() {
		return message.get(pageName);
	}
}
